<?php
if (!defined('libs')) {
    header('Location: ../404error.php');
}
include_once controlador . 'controlador.php';

$plantillaRender = new controlador();
include_once libs . 'dbClass.php';
$consulta = new dbClass();
?>    
<!DOCTYPE html>
<html>
    <head>

        <title></title><link href='http://fonts.googleapis.com/css?family=Rosario:400,400italic,700,700italic' rel='stylesheet' type='text/css'>




        <link rel="stylesheet" href="plantillas/css/layout.css" type="text/css" media="screen" charset="utf-8">
        <link rel="stylesheet" href="plantillas/css/jd.gallery.css" type="text/css" media="screen" charset="utf-8">

        <script src="plantillas/js/mootools-1.2.1-core-yc.js" type="text/javascript"></script>
        <script src="plantillas/js/jd.gallery.js" type="text/javascript"></script>
        <script src="plantillas/js/mootools-1.2-more.js" type="text/javascript"></script>
    </head>
    <body style=" background-image: url('plantillas/imagenes/textMadera2.png');">

        <script type="text/javascript">
            function startGallery() {
                var myGallery = new gallery($('myGallery'), {
                    timed: false
                });
            }
            window.addEvent('domready',startGallery);
      
        </script>
        <div style="background-color: #130200;color:#b8b2b2; font-size: small; font-family: 'Rosario', sans-serif; text-align: center; position: relative; float: left; width: 200px; height: auto; ">
            <div style=" position: relative; width:180px;  font-family: 'Rosario', sans-serif; margin: 0 auto; padding: 10px;">
                <?php
                $aliasC;
                $descripcionCarros;
                $datos = $plantillaRender->datosCarros(htmlentities($_REQUEST['v'], ENT_QUOTES));
                //   $datos = $consulta->consultaDB('SELECT * FROM goldenAge_carros WHERE id = "' . $_REQUEST['v'] . '"');
                while ($row2 = mysql_fetch_array($datos)) {
                    echo '' . strtoupper($row2['Nombre']) . '';
                    $aliasC = strtoupper($row2['Alias']);
                    $descripcionCarros = $row2['Texto'];
                    echo '<br />';
                    echo '<br />';
                }
                $datos2 = $plantillaRender->especificacionesCarro(htmlentities($_REQUEST['v'], ENT_QUOTES));
                //  $datos2 = $consulta->consultaDB('SELECT * FROM goldenAge_especificaciones WHERE Carro = "' . $_REQUEST['v'] . '"');
                while ($row3 = mysql_fetch_array($datos2)) {
                    echo '' . strtoupper($row3['Titulo']) . ': ';
                    echo strtoupper($row3['Valor']);
                    echo '<br />';
                }
                ?>
            </div>

        </div>
        <div style="color:#908682; text-align: center; position: absolute; font-family: 'Rosario', sans-serif; top:10px; right: 10px; width: 600px; height: 300px;">
            <div style=" position: relative;width:600px; font-family: 'Rosario', sans-serif; margin: 0 auto">
                <span style=" font-size: x-small;"> Si se encuentra Interesado en este vehiculo contactenos:</span> <br />
                <?php
                $datos3 = $plantillaRender->fotosCarro($aliasC);
//$datos3 = $consulta->consultaDB('SELECT * FROM goldenAge_fotografias WHERE Carro = "' . $aliasC . '" AND principal = 1 ORDER BY Fecha');
                ?>
                <div id="myGallery">


                    <?php
                    while ($row4 = mysql_fetch_array($datos3)) {
                        echo '<div class="imageElement">';
                        echo '<h3>' . $row4['Titulo'] . '</h3>';
                        echo '<p>' . $row4['Descripcion'] . '</p>';
                        echo '<a href="#" title="open image" class="open"></a>';
                        echo '<img src="' . $row4['Miniatura2'] . '" class="full" />';
                        echo '<img src="' . $row4['Miniatura1'] . '" class="thumbnail" />';

                        echo '</div>';
                    }
                    ?>



                </div>
            </div>

            <?php
            echo '<div  style="width=550px;text-align:justify; padding:10px; height: 130px; font-size: small; max-height: 130px; overflow-x:hidden ;overflow-y:auto;">' . $descripcionCarros . '</div>';
            ?>
        </div>
    </div>
</body>
</html>